/*
 * Copyright 2022 The Open Islands Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.openislands.oi.pojo.dto;

import org.openislands.oi.constant.RoleType;
import org.openislands.oi.constant.JobState;
import org.openislands.oi.constant.JobType;
import org.openislands.oi.pojo.base.JobCommonPOJO;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

public class JobDTO extends JobCommonPOJO implements Serializable {
    //from user
    private JobType jobType;
    private String userId;
    private String name;
    private String note;
    private String conf;

    //from create
    private String confOverwrite;
    private String runtimeConf;
    private String leaderNode;
    private Map<RoleType, List<String>> nodes;

    private JobState nextState;
    private JobState state;
    private Integer progress;
    private Date startTime;
    private Date endTime;
    private Integer elapsed;

    public JobType getJobType() {
        return jobType;
    }

    public void setJobType(JobType jobType) {
        this.jobType = jobType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getConf() {
        return conf;
    }

    public void setConf(String conf) {
        this.conf = conf;
    }

    public String getConfOverwrite() {
        return confOverwrite;
    }

    public void setConfOverwrite(String confOverwrite) {
        this.confOverwrite = confOverwrite;
    }

    public String getRuntimeConf() {
        return runtimeConf;
    }

    public void setRuntimeConf(String runtimeConf) {
        this.runtimeConf = runtimeConf;
    }

    public JobState getState() {
        return state;
    }

    public void setState(JobState state) {
        this.state = state;
    }

    public String getLeaderNode() {
        return leaderNode;
    }

    public void setLeaderNode(String leaderNode) {
        this.leaderNode = leaderNode;
    }

    public Integer getProgress() {
        return progress;
    }

    public void setProgress(Integer progress) {
        this.progress = progress;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getElapsed() {
        return elapsed;
    }

    public void setElapsed(Integer elapsed) {
        this.elapsed = elapsed;
    }

    public Map<RoleType, List<String>> getNodes() {
        return nodes;
    }

    public void setNodes(Map<RoleType, List<String>> nodes) {
        this.nodes = nodes;
    }

    public JobState getNextState() {
        return nextState;
    }

    public void setNextState(JobState nextState) {
        this.nextState = nextState;
    }
}
